<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SC2API: sc2::ObservationInterface Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="SC2-Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SC2API
   </div>
   <div id="projectbrief">An API for AI for StarCraft II</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sc2</b></li><li class="navelem"><a class="el" href="classsc2_1_1_observation_interface.html">ObservationInterface</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsc2_1_1_observation_interface-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">sc2::ObservationInterface Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="classsc2_1_1_observation_interface.html" title="The ObservationInterface reflects the current state of the game. Guaranteed to be valid when OnGameSt...">ObservationInterface</a> reflects the current state of the game. Guaranteed to be valid when OnGameStart or OnStep is called.  
 <a href="classsc2_1_1_observation_interface.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="sc2__interfaces_8h_source.html">sc2_interfaces.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a21c3f197fe6578e63ef6b2eaa2be082c"><td class="memItemLeft" align="right" valign="top">virtual uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a21c3f197fe6578e63ef6b2eaa2be082c">GetPlayerID</a> () const =0</td></tr>
<tr class="separator:a21c3f197fe6578e63ef6b2eaa2be082c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19d85546124654418d00b736f0146218"><td class="memItemLeft" align="right" valign="top">virtual uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a19d85546124654418d00b736f0146218">GetGameLoop</a> () const =0</td></tr>
<tr class="separator:a19d85546124654418d00b736f0146218"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab08e71ba04b19d3b4048ce9da6838e00"><td class="memItemLeft" align="right" valign="top">virtual const Units &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#ab08e71ba04b19d3b4048ce9da6838e00">GetUnits</a> () const =0</td></tr>
<tr class="separator:ab08e71ba04b19d3b4048ce9da6838e00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa43cfa17a9ac893500bce33eb41e6171"><td class="memItemLeft" align="right" valign="top">virtual Units&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#aa43cfa17a9ac893500bce33eb41e6171">GetUnits</a> (<a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">Unit::Alliance</a> alliance, <a class="el" href="sc2__interfaces_8h.html#a5cc3d9751182ccd2b085f3e272bcc88b">Filter</a> filter={}) const =0</td></tr>
<tr class="separator:aa43cfa17a9ac893500bce33eb41e6171"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0d22edc6bd276b8e9d27387294fdc88"><td class="memItemLeft" align="right" valign="top">virtual Units&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#ab0d22edc6bd276b8e9d27387294fdc88">GetUnits</a> (<a class="el" href="sc2__interfaces_8h.html#a5cc3d9751182ccd2b085f3e272bcc88b">Filter</a> filter) const =0</td></tr>
<tr class="separator:ab0d22edc6bd276b8e9d27387294fdc88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f766e5a6522a6966b4d2abf0a2daff2"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classsc2_1_1_unit.html">Unit</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a0f766e5a6522a6966b4d2abf0a2daff2">GetUnit</a> (Tag tag) const =0</td></tr>
<tr class="separator:a0f766e5a6522a6966b4d2abf0a2daff2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59684d8b385941931e6175800eb4bbdb"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classsc2_1_1_unit.html">Unit</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a59684d8b385941931e6175800eb4bbdb">GetPreviousUnit</a> (Tag tag) const =0</td></tr>
<tr class="separator:a59684d8b385941931e6175800eb4bbdb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30cdffc5d5c87797c5c154fe50bad768"><td class="memItemLeft" align="right" valign="top">virtual const Units &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a30cdffc5d5c87797c5c154fe50bad768">GetUnitsAdded</a> () const =0</td></tr>
<tr class="separator:a30cdffc5d5c87797c5c154fe50bad768"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a656f51b87f1fafeeff37206345793476"><td class="memItemLeft" align="right" valign="top">virtual const Units &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a656f51b87f1fafeeff37206345793476">GetUnitsRemoved</a> () const =0</td></tr>
<tr class="separator:a656f51b87f1fafeeff37206345793476"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa247d650d50d3d1bfe81642df96b1360"><td class="memItemLeft" align="right" valign="top">virtual const RawActions &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#aa247d650d50d3d1bfe81642df96b1360">GetRawActions</a> () const =0</td></tr>
<tr class="separator:aa247d650d50d3d1bfe81642df96b1360"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e0b5b6e6e6ce0a879c1854b696dcdb0"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="structsc2_1_1_spatial_actions.html">SpatialActions</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a1e0b5b6e6e6ce0a879c1854b696dcdb0">GetFeatureLayerActions</a> () const =0</td></tr>
<tr class="separator:a1e0b5b6e6e6ce0a879c1854b696dcdb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf25ada67444ace346e57c1ad367ca8e"><td class="memItemLeft" align="right" valign="top">virtual const std::vector&lt; <a class="el" href="structsc2_1_1_power_source.html">PowerSource</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#abf25ada67444ace346e57c1ad367ca8e">GetPowerSources</a> () const =0</td></tr>
<tr class="separator:abf25ada67444ace346e57c1ad367ca8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a794661f0072921a75d4c5851cfb9e9"><td class="memItemLeft" align="right" valign="top">virtual const std::vector&lt; <a class="el" href="classsc2_1_1_s_c2_type.html">UpgradeID</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a0a794661f0072921a75d4c5851cfb9e9">GetUpgrades</a> () const =0</td></tr>
<tr class="separator:a0a794661f0072921a75d4c5851cfb9e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ced6a72078288c373ad04c72eb1fba7"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="structsc2_1_1_score.html">Score</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a3ced6a72078288c373ad04c72eb1fba7">GetScore</a> () const =0</td></tr>
<tr class="separator:a3ced6a72078288c373ad04c72eb1fba7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99e1d892c350e4ae10c615bf3185eb85"><td class="memItemLeft" align="right" valign="top">virtual const Abilities &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a99e1d892c350e4ae10c615bf3185eb85">GetAbilityData</a> (bool force_refresh=false) const =0</td></tr>
<tr class="separator:a99e1d892c350e4ae10c615bf3185eb85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae80acee23f67a2b5f67fa511dd158aca"><td class="memItemLeft" align="right" valign="top">virtual const UnitTypes &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#ae80acee23f67a2b5f67fa511dd158aca">GetUnitTypeData</a> (bool force_refresh=false) const =0</td></tr>
<tr class="separator:ae80acee23f67a2b5f67fa511dd158aca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10b0d3b3131951ad656cb091aaa2040d"><td class="memItemLeft" align="right" valign="top">virtual const Upgrades &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a10b0d3b3131951ad656cb091aaa2040d">GetUpgradeData</a> (bool force_refresh=false) const =0</td></tr>
<tr class="separator:a10b0d3b3131951ad656cb091aaa2040d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b891d52ce1fe82dac0288797ad3720a"><td class="memItemLeft" align="right" valign="top">virtual const Buffs &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a1b891d52ce1fe82dac0288797ad3720a">GetBuffData</a> (bool force_refresh=false) const =0</td></tr>
<tr class="separator:a1b891d52ce1fe82dac0288797ad3720a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b73eb640b052409b0095609a8136102"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="structsc2_1_1_game_info.html">GameInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a7b73eb640b052409b0095609a8136102">GetGameInfo</a> () const =0</td></tr>
<tr class="separator:a7b73eb640b052409b0095609a8136102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a107f76b56a961407bb772d91dfbbb040"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a107f76b56a961407bb772d91dfbbb040">GetMinerals</a> () const =0</td></tr>
<tr class="separator:a107f76b56a961407bb772d91dfbbb040"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa31de2f1b14a2306a282fef7314fbf37"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#aa31de2f1b14a2306a282fef7314fbf37">GetVespene</a> () const =0</td></tr>
<tr class="separator:aa31de2f1b14a2306a282fef7314fbf37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac556f665e6920eb853711c1b7d4d54b3"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#ac556f665e6920eb853711c1b7d4d54b3">GetFoodCap</a> () const =0</td></tr>
<tr class="separator:ac556f665e6920eb853711c1b7d4d54b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77f230bd98b95599338c7788aee00d26"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a77f230bd98b95599338c7788aee00d26">GetFoodUsed</a> () const =0</td></tr>
<tr class="separator:a77f230bd98b95599338c7788aee00d26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fd13a2a776f08f714d941ba9e4bafa8"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a7fd13a2a776f08f714d941ba9e4bafa8">GetFoodArmy</a> () const =0</td></tr>
<tr class="separator:a7fd13a2a776f08f714d941ba9e4bafa8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19f0bdd8df647ee935dbe6f3c50d64e7"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a19f0bdd8df647ee935dbe6f3c50d64e7">GetFoodWorkers</a> () const =0</td></tr>
<tr class="separator:a19f0bdd8df647ee935dbe6f3c50d64e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa02a57eddba0fca44df116439979f8b7"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#aa02a57eddba0fca44df116439979f8b7">GetIdleWorkerCount</a> () const =0</td></tr>
<tr class="separator:aa02a57eddba0fca44df116439979f8b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ab99209855a20aae751684e1af19aaa"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a1ab99209855a20aae751684e1af19aaa">GetArmyCount</a> () const =0</td></tr>
<tr class="separator:a1ab99209855a20aae751684e1af19aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade7028b262089975621a18c54d4cddb3"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#ade7028b262089975621a18c54d4cddb3">GetWarpGateCount</a> () const =0</td></tr>
<tr class="separator:ade7028b262089975621a18c54d4cddb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0415e17a101e959a412e97f5db39358"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#ae0415e17a101e959a412e97f5db39358">GetCameraPos</a> () const =0</td></tr>
<tr class="separator:ae0415e17a101e959a412e97f5db39358"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67b41bf8b933702e2d83db5f7f2095f3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="structsc2_1_1_point3_d.html">Point3D</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a67b41bf8b933702e2d83db5f7f2095f3">GetStartLocation</a> () const =0</td></tr>
<tr class="separator:a67b41bf8b933702e2d83db5f7f2095f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a155ebc1b654779ca8bd489d13d91d57c"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a155ebc1b654779ca8bd489d13d91d57c">HasCreep</a> (const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;point) const =0</td></tr>
<tr class="separator:a155ebc1b654779ca8bd489d13d91d57c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab17337d7e05f1e9cf80252da10f01b04"><td class="memItemLeft" align="right" valign="top">virtual Visibility&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#ab17337d7e05f1e9cf80252da10f01b04">GetVisibility</a> (const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;point) const =0</td></tr>
<tr class="separator:ab17337d7e05f1e9cf80252da10f01b04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09ba9ccd3b9c32a6e57d80da3e739a49"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a09ba9ccd3b9c32a6e57d80da3e739a49">IsPathable</a> (const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;point) const =0</td></tr>
<tr class="memdesc:a09ba9ccd3b9c32a6e57d80da3e739a49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns 'true' if the given point on the terrain is pathable. This does not.  <a href="#a09ba9ccd3b9c32a6e57d80da3e739a49">More...</a><br /></td></tr>
<tr class="separator:a09ba9ccd3b9c32a6e57d80da3e739a49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aceb3be53ab7a68e268169e6f786e61f6"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#aceb3be53ab7a68e268169e6f786e61f6">IsPlacable</a> (const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;point) const =0</td></tr>
<tr class="memdesc:aceb3be53ab7a68e268169e6f786e61f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns 'true' if the given point on the terrain is buildable. This does not.  <a href="#aceb3be53ab7a68e268169e6f786e61f6">More...</a><br /></td></tr>
<tr class="separator:aceb3be53ab7a68e268169e6f786e61f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e6d0c2bce48f675b3d4b99f925dfafb"><td class="memItemLeft" align="right" valign="top">virtual float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a8e6d0c2bce48f675b3d4b99f925dfafb">TerrainHeight</a> (const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;point) const =0</td></tr>
<tr class="separator:a8e6d0c2bce48f675b3d4b99f925dfafb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a375edbd0639c948d8c83bdcd4ebd4932"><td class="memItemLeft" align="right" valign="top">virtual const SC2APIProtocol::Observation *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_observation_interface.html#a375edbd0639c948d8c83bdcd4ebd4932">GetRawObservation</a> () const =0</td></tr>
<tr class="memdesc:a375edbd0639c948d8c83bdcd4ebd4932"><td class="mdescLeft">&#160;</td><td class="mdescRight">A pointer to the low-level protocol data for the current observation. While it's possible to extract most in-game data from this pointer.  <a href="#a375edbd0639c948d8c83bdcd4ebd4932">More...</a><br /></td></tr>
<tr class="separator:a375edbd0639c948d8c83bdcd4ebd4932"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="classsc2_1_1_observation_interface.html" title="The ObservationInterface reflects the current state of the game. Guaranteed to be valid when OnGameSt...">ObservationInterface</a> reflects the current state of the game. Guaranteed to be valid when OnGameStart or OnStep is called. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a99e1d892c350e4ae10c615bf3185eb85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99e1d892c350e4ae10c615bf3185eb85">&#9670;&nbsp;</a></span>GetAbilityData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const Abilities&amp; sc2::ObservationInterface::GetAbilityData </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_refresh</em> = <code>false</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets metadata of abilities. Array can be indexed directly by AbilityID. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">force_refresh</td><td>forces a full query from the game, may otherwise cache data from a previous call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data about all abilities possible for the current game session. </dd></dl>

</div>
</div>
<a id="a1ab99209855a20aae751684e1af19aaa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ab99209855a20aae751684e1af19aaa">&#9670;&nbsp;</a></span>GetArmyCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetArmyCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The number of army units. </p><dl class="section return"><dt>Returns</dt><dd>Count of army units. </dd></dl>

</div>
</div>
<a id="a1b891d52ce1fe82dac0288797ad3720a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b891d52ce1fe82dac0288797ad3720a">&#9670;&nbsp;</a></span>GetBuffData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const Buffs&amp; sc2::ObservationInterface::GetBuffData </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_refresh</em> = <code>false</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets metadata of buffs. Array can be indexed directly by BuffID. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">force_refresh</td><td>forces a full query from the game, may otherwise cache data from a previous call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data about all buffs possible for the current game session. </dd></dl>

</div>
</div>
<a id="ae0415e17a101e959a412e97f5db39358"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0415e17a101e959a412e97f5db39358">&#9670;&nbsp;</a></span>GetCameraPos()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> sc2::ObservationInterface::GetCameraPos </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Position of the center of the camera. </p><dl class="section return"><dt>Returns</dt><dd>Camera position. </dd></dl>

</div>
</div>
<a id="a1e0b5b6e6e6ce0a879c1854b696dcdb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e0b5b6e6e6ce0a879c1854b696dcdb0">&#9670;&nbsp;</a></span>GetFeatureLayerActions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="structsc2_1_1_spatial_actions.html">SpatialActions</a>&amp; sc2::ObservationInterface::GetFeatureLayerActions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets a list of actions performed as abilities applied to the current selection. For use with the feature layer or rendered options. </p><dl class="section return"><dt>Returns</dt><dd>List of actions. </dd></dl>

</div>
</div>
<a id="a7fd13a2a776f08f714d941ba9e4bafa8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7fd13a2a776f08f714d941ba9e4bafa8">&#9670;&nbsp;</a></span>GetFoodArmy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetFoodArmy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The total supply consumed by army units alone. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classsc2_1_1_observation_interface.html#a77f230bd98b95599338c7788aee00d26">GetFoodUsed()</a> <a class="el" href="classsc2_1_1_observation_interface.html#a19f0bdd8df647ee935dbe6f3c50d64e7">GetFoodWorkers()</a> </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Food used by army units. </dd></dl>

</div>
</div>
<a id="ac556f665e6920eb853711c1b7d4d54b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac556f665e6920eb853711c1b7d4d54b3">&#9670;&nbsp;</a></span>GetFoodCap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetFoodCap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The total supply cap given the players max possible supply. </p><dl class="section return"><dt>Returns</dt><dd>Food cap. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsc2_1_1_observation_interface.html#a77f230bd98b95599338c7788aee00d26">GetFoodUsed()</a> <a class="el" href="classsc2_1_1_observation_interface.html#a7fd13a2a776f08f714d941ba9e4bafa8">GetFoodArmy()</a> <a class="el" href="classsc2_1_1_observation_interface.html#a19f0bdd8df647ee935dbe6f3c50d64e7">GetFoodWorkers()</a> </dd></dl>

</div>
</div>
<a id="a77f230bd98b95599338c7788aee00d26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77f230bd98b95599338c7788aee00d26">&#9670;&nbsp;</a></span>GetFoodUsed()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetFoodUsed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The total supply used by the player as defined: <a class="el" href="classsc2_1_1_observation_interface.html#a7fd13a2a776f08f714d941ba9e4bafa8">GetFoodArmy()</a> + <a class="el" href="classsc2_1_1_observation_interface.html#a19f0bdd8df647ee935dbe6f3c50d64e7">GetFoodWorkers()</a>. </p><dl class="section return"><dt>Returns</dt><dd>Food used. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsc2_1_1_observation_interface.html#a7fd13a2a776f08f714d941ba9e4bafa8">GetFoodArmy()</a> <a class="el" href="classsc2_1_1_observation_interface.html#a19f0bdd8df647ee935dbe6f3c50d64e7">GetFoodWorkers()</a> </dd></dl>

</div>
</div>
<a id="a19f0bdd8df647ee935dbe6f3c50d64e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19f0bdd8df647ee935dbe6f3c50d64e7">&#9670;&nbsp;</a></span>GetFoodWorkers()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetFoodWorkers </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The total supply consumed by workers units alone. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classsc2_1_1_observation_interface.html#a7fd13a2a776f08f714d941ba9e4bafa8">GetFoodArmy()</a> <a class="el" href="classsc2_1_1_observation_interface.html#a77f230bd98b95599338c7788aee00d26">GetFoodUsed()</a> </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Food used by worker units. </dd></dl>

</div>
</div>
<a id="a7b73eb640b052409b0095609a8136102"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b73eb640b052409b0095609a8136102">&#9670;&nbsp;</a></span>GetGameInfo()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="structsc2_1_1_game_info.html">GameInfo</a>&amp; sc2::ObservationInterface::GetGameInfo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets the <a class="el" href="structsc2_1_1_game_info.html" title="Initial data for a game and map. ">GameInfo</a> struct for the current map. </p><dl class="section return"><dt>Returns</dt><dd>The current <a class="el" href="structsc2_1_1_game_info.html" title="Initial data for a game and map. ">GameInfo</a> struct. </dd></dl>

</div>
</div>
<a id="a19d85546124654418d00b736f0146218"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19d85546124654418d00b736f0146218">&#9670;&nbsp;</a></span>GetGameLoop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint32_t sc2::ObservationInterface::GetGameLoop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the current game loop for this observation. </p><dl class="section return"><dt>Returns</dt><dd>The game loop. </dd></dl>

</div>
</div>
<a id="aa02a57eddba0fca44df116439979f8b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa02a57eddba0fca44df116439979f8b7">&#9670;&nbsp;</a></span>GetIdleWorkerCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetIdleWorkerCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The number of workers that currently have no orders. </p><dl class="section return"><dt>Returns</dt><dd>Count of idle workers. </dd></dl>

</div>
</div>
<a id="a107f76b56a961407bb772d91dfbbb040"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a107f76b56a961407bb772d91dfbbb040">&#9670;&nbsp;</a></span>GetMinerals()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetMinerals </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The mineral count of the player. </p><dl class="section return"><dt>Returns</dt><dd>The mineral count. </dd></dl>

</div>
</div>
<a id="a21c3f197fe6578e63ef6b2eaa2be082c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21c3f197fe6578e63ef6b2eaa2be082c">&#9670;&nbsp;</a></span>GetPlayerID()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual uint32_t sc2::ObservationInterface::GetPlayerID </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets a unique ID that represents the player. </p><dl class="section return"><dt>Returns</dt><dd>The player ID. </dd></dl>

</div>
</div>
<a id="abf25ada67444ace346e57c1ad367ca8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf25ada67444ace346e57c1ad367ca8e">&#9670;&nbsp;</a></span>GetPowerSources()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::vector&lt;<a class="el" href="structsc2_1_1_power_source.html">PowerSource</a>&gt;&amp; sc2::ObservationInterface::GetPowerSources </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets all power sources associated with the current player. </p><dl class="section return"><dt>Returns</dt><dd>List of power sources. </dd></dl>

</div>
</div>
<a id="a59684d8b385941931e6175800eb4bbdb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59684d8b385941931e6175800eb4bbdb">&#9670;&nbsp;</a></span>GetPreviousUnit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classsc2_1_1_unit.html">Unit</a>* sc2::ObservationInterface::GetPreviousUnit </td>
          <td>(</td>
          <td class="paramtype">Tag&#160;</td>
          <td class="paramname"><em>tag</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the unit state as represented by the the call to GetObservation from the previous frame. This is useful for calculating deltas between <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> states. It is unsafe to assume GetUnit and GetPreviousUnit will both necessarily return a <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> given the same tag. The <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> may have been created or destroyed in the last step. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tag</td><td>Unique tag of the unit. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> object. </dd></dl>

</div>
</div>
<a id="aa247d650d50d3d1bfe81642df96b1360"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa247d650d50d3d1bfe81642df96b1360">&#9670;&nbsp;</a></span>GetRawActions()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const RawActions&amp; sc2::ObservationInterface::GetRawActions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets a list of actions performed as abilities applied to units. For use with the raw option. </p><dl class="section return"><dt>Returns</dt><dd>List of raw actions. </dd></dl>

</div>
</div>
<a id="a375edbd0639c948d8c83bdcd4ebd4932"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a375edbd0639c948d8c83bdcd4ebd4932">&#9670;&nbsp;</a></span>GetRawObservation()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const SC2APIProtocol::Observation* sc2::ObservationInterface::GetRawObservation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>A pointer to the low-level protocol data for the current observation. While it's possible to extract most in-game data from this pointer. </p>
<p>&lt; </p><dl class="section return"><dt>Returns</dt><dd>A const pointer to the Observation. </dd></dl>
<dl class="section see"><dt>See also</dt><dd>Observation GetObservation() </dd></dl>

</div>
</div>
<a id="a3ced6a72078288c373ad04c72eb1fba7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ced6a72078288c373ad04c72eb1fba7">&#9670;&nbsp;</a></span>GetScore()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="structsc2_1_1_score.html">Score</a>&amp; sc2::ObservationInterface::GetScore </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets the detailed current set of scores. </p><dl class="section return"><dt>Returns</dt><dd>The current score structure. </dd></dl>

</div>
</div>
<a id="a67b41bf8b933702e2d83db5f7f2095f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67b41bf8b933702e2d83db5f7f2095f3">&#9670;&nbsp;</a></span>GetStartLocation()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="structsc2_1_1_point3_d.html">Point3D</a> sc2::ObservationInterface::GetStartLocation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets the initial start location of the player. </p><dl class="section return"><dt>Returns</dt><dd>Player start position. </dd></dl>

</div>
</div>
<a id="a0f766e5a6522a6966b4d2abf0a2daff2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f766e5a6522a6966b4d2abf0a2daff2">&#9670;&nbsp;</a></span>GetUnit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classsc2_1_1_unit.html">Unit</a>* sc2::ObservationInterface::GetUnit </td>
          <td>(</td>
          <td class="paramtype">Tag&#160;</td>
          <td class="paramname"><em>tag</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get the unit state as represented by the last call to GetObservation. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">tag</td><td>Unique tag of the unit. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> object. </dd></dl>

</div>
</div>
<a id="ab08e71ba04b19d3b4048ce9da6838e00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab08e71ba04b19d3b4048ce9da6838e00">&#9670;&nbsp;</a></span>GetUnits() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const Units&amp; sc2::ObservationInterface::GetUnits </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get a list of all known units in the game. </p><dl class="section return"><dt>Returns</dt><dd>List of all ally and visible enemy and neutral units. </dd></dl>

</div>
</div>
<a id="aa43cfa17a9ac893500bce33eb41e6171"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa43cfa17a9ac893500bce33eb41e6171">&#9670;&nbsp;</a></span>GetUnits() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Units sc2::ObservationInterface::GetUnits </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">Unit::Alliance</a>&#160;</td>
          <td class="paramname"><em>alliance</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="sc2__interfaces_8h.html#a5cc3d9751182ccd2b085f3e272bcc88b">Filter</a>&#160;</td>
          <td class="paramname"><em>filter</em> = <code>{}</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get all units belonging to a certain alliance and meet the conditions provided by the filter. The unit structure is const data only. Therefore editing that data will not change any in game state. See the <a class="el" href="classsc2_1_1_action_interface.html">ActionInterface</a> for changing <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> state. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">alliance</td><td>The faction the units belong to. </td></tr>
    <tr><td class="paramname">filter</td><td>A functor or lambda used to filter out any unneeded units in the list. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A list of units that meet the conditions provided by alliance and filter. </dd></dl>

</div>
</div>
<a id="ab0d22edc6bd276b8e9d27387294fdc88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0d22edc6bd276b8e9d27387294fdc88">&#9670;&nbsp;</a></span>GetUnits() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Units sc2::ObservationInterface::GetUnits </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sc2__interfaces_8h.html#a5cc3d9751182ccd2b085f3e272bcc88b">Filter</a>&#160;</td>
          <td class="paramname"><em>filter</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Get all units belonging to self that meet the conditions provided by the filter. The unit structure is const data only. Therefore editing that data will not change any in game state. See the <a class="el" href="classsc2_1_1_action_interface.html">ActionInterface</a> for changing <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> state. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filter</td><td>A functor or lambda used to filter out any unneeded units in the list. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A list of units that meet the conditions provided by the filter. </dd></dl>

</div>
</div>
<a id="a30cdffc5d5c87797c5c154fe50bad768"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30cdffc5d5c87797c5c154fe50bad768">&#9670;&nbsp;</a></span>GetUnitsAdded()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const Units&amp; sc2::ObservationInterface::GetUnitsAdded </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets a list of units added in the previous step. You could also hook into the OnUnitCreated event for this data on a per <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> basis. </p><dl class="section see"><dt>See also</dt><dd>OnUnitCreated() </dd></dl>

</div>
</div>
<a id="a656f51b87f1fafeeff37206345793476"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a656f51b87f1fafeeff37206345793476">&#9670;&nbsp;</a></span>GetUnitsRemoved()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const Units&amp; sc2::ObservationInterface::GetUnitsRemoved </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets a list of units added in the previous step. You could also hook into the OnUnitCreated event for this data on a per <a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> basis. Ally units disappear because they are destroyed. Enemy units may disappear because they move out of visibility, or because they are destroyed. </p><dl class="section return"><dt>Returns</dt><dd>A list of units that were removed from the observation. </dd></dl>
<dl class="section see"><dt>See also</dt><dd>OnUnitCreated() </dd></dl>

</div>
</div>
<a id="ae80acee23f67a2b5f67fa511dd158aca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae80acee23f67a2b5f67fa511dd158aca">&#9670;&nbsp;</a></span>GetUnitTypeData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const UnitTypes&amp; sc2::ObservationInterface::GetUnitTypeData </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_refresh</em> = <code>false</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets metadata of units. Array can be indexed directly by UnitID. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">force_refresh</td><td>forces a full query from the game, may otherwise cache data from a previous call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data about all units possible for the current game session. </dd></dl>

</div>
</div>
<a id="a10b0d3b3131951ad656cb091aaa2040d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10b0d3b3131951ad656cb091aaa2040d">&#9670;&nbsp;</a></span>GetUpgradeData()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const Upgrades&amp; sc2::ObservationInterface::GetUpgradeData </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_refresh</em> = <code>false</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets metadata of upgrades. Array can be indexed directly by UpgradeID. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">force_refresh</td><td>forces a full query from the game, may otherwise cache data from a previous call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data about all upgrades possible for the current game session. </dd></dl>

</div>
</div>
<a id="a0a794661f0072921a75d4c5851cfb9e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a794661f0072921a75d4c5851cfb9e9">&#9670;&nbsp;</a></span>GetUpgrades()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::vector&lt;<a class="el" href="classsc2_1_1_s_c2_type.html">UpgradeID</a>&gt;&amp; sc2::ObservationInterface::GetUpgrades </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Gets all upgrades. </p><dl class="section return"><dt>Returns</dt><dd>List of upgrades. </dd></dl>

</div>
</div>
<a id="aa31de2f1b14a2306a282fef7314fbf37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa31de2f1b14a2306a282fef7314fbf37">&#9670;&nbsp;</a></span>GetVespene()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetVespene </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The vespene count of the player. </p><dl class="section return"><dt>Returns</dt><dd>The vespene count. </dd></dl>

</div>
</div>
<a id="ab17337d7e05f1e9cf80252da10f01b04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab17337d7e05f1e9cf80252da10f01b04">&#9670;&nbsp;</a></span>GetVisibility()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Visibility sc2::ObservationInterface::GetVisibility </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns visibility value of the given point for the current player. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">point</td><td>Position to sample. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Visibility. </dd></dl>

</div>
</div>
<a id="ade7028b262089975621a18c54d4cddb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade7028b262089975621a18c54d4cddb3">&#9670;&nbsp;</a></span>GetWarpGateCount()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t sc2::ObservationInterface::GetWarpGateCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Number of warp gates owned by the player. This value should only be nonzero for Protoss. </p><dl class="section return"><dt>Returns</dt><dd>Count of warp gates. </dd></dl>

</div>
</div>
<a id="a155ebc1b654779ca8bd489d13d91d57c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a155ebc1b654779ca8bd489d13d91d57c">&#9670;&nbsp;</a></span>HasCreep()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool sc2::ObservationInterface::HasCreep </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns 'true' if the given point has creep. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">point</td><td>Position to sample. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Creep. </dd></dl>

</div>
</div>
<a id="a09ba9ccd3b9c32a6e57d80da3e739a49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09ba9ccd3b9c32a6e57d80da3e739a49">&#9670;&nbsp;</a></span>IsPathable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool sc2::ObservationInterface::IsPathable </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns 'true' if the given point on the terrain is pathable. This does not. </p>
<p>&lt; </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">point</td><td>Position to sample. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pathable. </dd></dl>

</div>
</div>
<a id="aceb3be53ab7a68e268169e6f786e61f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aceb3be53ab7a68e268169e6f786e61f6">&#9670;&nbsp;</a></span>IsPlacable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool sc2::ObservationInterface::IsPlacable </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns 'true' if the given point on the terrain is buildable. This does not. </p>
<p>&lt; </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">point</td><td>Position to sample. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Placable. </dd></dl>

</div>
</div>
<a id="a8e6d0c2bce48f675b3d4b99f925dfafb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e6d0c2bce48f675b3d4b99f925dfafb">&#9670;&nbsp;</a></span>TerrainHeight()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual float sc2::ObservationInterface::TerrainHeight </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>point</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns terrain height of the given point. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">point</td><td>Position to sample. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Height. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/sc2api/<a class="el" href="sc2__interfaces_8h_source.html">sc2_interfaces.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
